package com.ruoyi.biz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ser.Serializers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.TrafficRecordMapper;
import com.ruoyi.biz.domain.TrafficRecord;
import com.ruoyi.biz.service.ITrafficRecordService;

/**
 * 通行记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-07
 */
@Service
public class TrafficRecordServiceImpl extends ServiceImpl<TrafficRecordMapper, TrafficRecord> implements ITrafficRecordService {



	@Autowired
	private TrafficRecordMapper trafficRecordMapper;

	/**
	 * 查询通行记录
	 *
	 * @param id 通行记录主键
	 * @return 通行记录
	 */
	@Override
	public TrafficRecord selectTrafficRecordById(Long id) {
		return trafficRecordMapper.selectTrafficRecordById(id);
	}

	/**
	 * 查询通行记录列表
	 *
	 * @param trafficRecord 通行记录
	 * @return 通行记录
	 */
	@Override
	public List<TrafficRecord> selectTrafficRecordList(TrafficRecord trafficRecord) {
		return trafficRecordMapper.selectTrafficRecordList(trafficRecord);
	}

	/**
	 * 新增通行记录
	 *
	 * @param trafficRecord 通行记录
	 * @return 结果
	 */
	@Override
	public int insertTrafficRecord(TrafficRecord trafficRecord) {
		return trafficRecordMapper.insertTrafficRecord(trafficRecord);
	}

	/**
	 * 修改通行记录
	 *
	 * @param trafficRecord 通行记录
	 * @return 结果
	 */
	@Override
	public int updateTrafficRecord(TrafficRecord trafficRecord) {
		return trafficRecordMapper.updateTrafficRecord(trafficRecord);
	}

	/**
	 * 批量删除通行记录
	 *
	 * @param ids 需要删除的通行记录主键
	 * @return 结果
	 */
	@Override
	public int deleteTrafficRecordByIds(Long[] ids) {
		return trafficRecordMapper.deleteTrafficRecordByIds(ids);
	}

	/**
	 * 删除通行记录信息
	 *
	 * @param id 通行记录主键
	 * @return 结果
	 */
	@Override
	public int deleteTrafficRecordById(Long id) {
		return trafficRecordMapper.deleteTrafficRecordById(id);
	}
}
